#!/usr/bin/perl

package My::PollutedClass;

use lib 'lib', '../lib';

use Scalar::Util 'looks_like_number';

use namespace::globref;

sub is_num {
    my ($self, $val) = @_;
    looks_like_number->("$val");
};

no namespace::globref;


package main;

print "My::Class ",
    My::PollutedClass->can('looks_like_number') ? "provides" : "doesn't provide",
    " looks_like_number\n";

print "42 is ", My::PollutedClass->is_num(42) ? "" : "not ", "a number\n";
print "abc is ", My::PollutedClass->is_num("abc") ? "" : "not ", "a number\n";
